//package com.bw.lib_database.database.db
//
//import androidx.room.DeleteColumn
//import androidx.room.RenameColumn
//import androidx.room.RenameTable
//import androidx.room.migration.AutoMigrationSpec
//import androidx.sqlite.db.SupportSQLiteDatabase
//
///**
// * 修改表明
// */
//
//@RenameTable(fromTableName = "user_info_table", toTableName = "user_info")
//class UserInfoAutoMigration:AutoMigrationSpec
//
//
///**
// * 修改表中的字段
// * 注意：修改实体里的的字段 然后使用下面的升级配置修改旧数据库中的字段名
// */
//@RenameColumn(tableName = "user_info",fromColumnName = "username", toColumnName = "name")
//class UserInfoColumnAutoMigration:AutoMigrationSpec
//
//
///**
// * 删除表中的字段
// */
//@DeleteColumn(tableName = "user_info_table", columnName = "ctime")
//class UserInfoDeleteColumnAutoMigration:AutoMigrationSpec{
//    override fun onPostMigrate(db: SupportSQLiteDatabase) {
//        super.onPostMigrate(db)
////        database.execSQL("""
////                CREATE TABLE new_Song (
////                    id INTEGER PRIMARY KEY NOT NULL,
////                    name TEXT,
////                    tag TEXT NOT NULL DEFAULT ''
////                )
////                """.trimIndent())
////        database.execSQL("""
////                INSERT INTO new_Song (id, name, tag)
////                SELECT id, name, tag FROM Song
////                """.trimIndent())
////        database.execSQL("DROP TABLE Song")
////        database.execSQL("ALTER TABLE new_Song RENAME TO Song")
//    }
//}
//
